<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<script src="js/vue.js"></script>
		<script src="js/axios.min.js"></script>
	</head>
	<body>
		<div id="app">
			<h2>仓库添加管理</h2><br>
			仓库类型 ： <input type="radio" value="总仓"  v-model="types">总仓 
			<input type="radio" v-model="types" value="区域前置仓"> 区域前置仓 <br> <br>
			仓库名称 ： <input type="text" v-model="name">  <br>
			仓库地址： <input type="text" v-model="address"><br><br>
			<input type="button" value="取消">  <input type="button" @click="add()" value="确认" class="btn btn-primary">
		</div>
	</body>
</html>
<script>
var app=new Vue({
	el:"#app",
	data:{
		types:"",
		name:"",
		address:"",
		
	},methods:{
		add(){
			var data=new FormData()
			data.append("types",this.types)
			data.append("name",this.name)
			data.append("address",this.address)
			axios.post("http://127.0.0.1:8080/add",data).then(function(res){
				alert(res.data.msg)
				location.reload()
			} )
		}, //add
	},created:function(){
		
	}
})
</script>